package com.yun.control;

import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
public class HelloControl {

    //加注释
    @ApiOperation ("测试能否启动")
    @GetMapping(value = "/hello")
    public String hello(){
        return "hello";
    }

    @ApiOperation ("测试字段注释")
    @PostMapping("/ApiParam")
    public String hello2(@ApiParam("名字") String name){
        String newName = "hello"+name;
        return newName;
    }


}
